<?php /*a:3:{s:42:"D:\www\long_shop\app\view\acc\fee_log.html";i:1702389678;s:42:"D:\www\long_shop\app\view\common\head.html";i:1702389678;s:48:"D:\www\long_shop\app\view\common\pagination.html";i:1702389678;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/jquery/jquery-1.12.4.min.js"></script>    
    <link href="/static/bst5.3.2/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/bst5.3.2/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="/static/bst-icons/font/bootstrap-icons.css">
    <script src="/static/layer/layer/layer.js"></script>
    <link rel="stylesheet" href="/static/css/my.css">    
</head>
<head>
    <title>费用查询</title>
    <link rel="stylesheet" href="/static/flatpickr/flatpickr.min.css">
    <script src="/static/flatpickr/flatpickr.min.js"></script>
<style type="text/css">
    input{display:initial!important;}
</style>    
</head>
<body >

    <div class="container-fluid " >

    <div class="row">
        <div class="col-2" style="text-align: left;line-height: 50px;font-size: 2rem;" >
            收付款查询
        </div>
        <div class="col-10">        
    <form action="/index.php/acc/fee_log" method="post">
        <div class="row" id="query_bar" style="height: 50px;line-height: 50px;">
            <div class="col">

            <label for="dept_id">部门：</label>  
            <select name="dept_id" class="form-control" style="display:initial!important;width: 140px;">
              <option value="all" <?php if($dept_id=='all'): ?> selected <?php endif; ?>>所有驾校</option>
              <?php foreach($school as $kv): ?>
                <option value="<?php echo htmlentities($kv['id']); ?>" <?php if($dept_id==$kv['id']): ?> selected <?php endif; ?>><?php echo htmlentities($kv['name']); ?></option>
              <?php endforeach; ?>
            </select>

            <label for="type">类型：</label>  
            <select name="type" class="form-control" style="display:initial!important;width: 140px;">
              <option value="1,2,3,4,5,6,7" <?php if($type=='all'): ?>selected<?php endif; ?>>所有类型</option>
              <?php foreach($acc_type as $k=>$v): ?>
                <option value="<?php echo htmlentities($k); ?>" <?php if($type==$k): ?>selected<?php endif; ?>><?php echo htmlentities($v); ?></option>
              <?php endforeach; ?>
            </select>

            <label for="name" >姓名：</label>
            <input class="form-control" type="text"  id="name" name="name" value="<?php echo htmlentities($name); ?>" placeholder="姓名" />
            <label for="mobile" >手机：</label>
            <input class="form-control" type="text"  id="mobile" name="mobile" value="<?php echo htmlentities($mobile); ?>" placeholder="手机号码" />

            <label for="order_no" >
                <input class="form-control" type="text" value="<?php echo htmlentities($sdate); ?>" id="sdate" name="sdate" placeholder="开始日期" />
            </label>

            <label for="sdate" >
                <input class="form-control" type="text" value="<?php echo htmlentities($edate); ?>" id="edate" name="edate" placeholder="结束日期" />
            </label>   

            <button type="button" class="btn btn-warning query" style="vertical-align: middle;" >
                <span class="bi-search" ></span>
            </button>            
        
            </div>

        </div>
    </form></div>
</div>

      <table class="table table-sm table-striped">
        <thead>
          <th>序号</th>
          <th>客户</th>
          <th>款项类型</th>
          <th>金额</th>
          <th>支付方式</th>
          <th>备注</th>
          <th>状态</th>
          <th>录入人/日期</th>
          <th>审核人/日期</th>
          <th>
<!--             <button type="button" class="btn btn btn-primary">
                <a href="/index.php/customer/charge" alt="充值"><span class="bi-cash" style="color:white;">充值</span></a>
            </button> -->
          </th>
        </thead>
        <tbody>
          <?php foreach($list['data'] as $k=>$log): ?>
          <tr>
            <td><?php echo htmlentities($k+1); ?></td>
            <td><?php echo htmlentities($log['customer_id_name']); ?></td>
            <td><?php echo htmlentities($log['type_name']); ?></td>
            <td <?php if($log['money']<0): ?> style="color: red;"<?php endif; ?>><?php echo htmlentities($log['money']); ?></td>
            <td><?php echo htmlentities($log['payment_name']); ?></td>
            <td><?php echo htmlentities($log['memo']); ?></td>
            <td><?php echo htmlentities($log['status_name']); ?></td>
            <td><?php echo htmlentities($log['creater']); ?><br/><?php echo htmlentities($log['create_time']); ?></td>
            <td><?php echo htmlentities($log['check_by_name']); ?><br/><?php echo htmlentities($log['create_time']); ?></td>
            <td></td>
          </tr>
          <?php endforeach; ?>
          <tr style="background:skyblue;">
            <td></td>
            <td></td>
            <td>总笔数:【<?php echo htmlentities($count); ?>】</td>
            <td>总金额:【<?php echo htmlentities($sum); ?>】</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>

        </tbody>
      </table>
          <ul class="pagination pagination" >

        <?php if($list['current_page']>1): ?>
            <li class="page-item">
                <a class="page-link" href="?page=1<?php if(!empty($query)): ?><?php echo htmlentities($query); ?><?php endif; if(!empty($show_grid)): ?>&show_grid=<?php echo htmlentities($show_grid); ?><?php endif; ?>">
                    <span class="bi-chevron-double-left"></span>
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="?page=<?php echo htmlentities($list['current_page']-1); if(!empty($query)): ?><?php echo htmlentities($query); ?><?php endif; if(!empty($show_grid)): ?>&show_grid=<?php echo htmlentities($show_grid); ?><?php endif; ?>">
                    <span class="bi-chevron-left"></span>
                </a>
            </li>
        <?php endif; ?>

        <li class="page-item">
            <c class="page-link text-secondary"><?php echo htmlentities($list['current_page']); ?>/<?php echo htmlentities($list['last_page']); ?></c>
        </li>

        <?php if($list['current_page']<$list['last_page']): ?>
            <li class="page-item">
                <a class="page-link" href="?page=<?php echo htmlentities($list['current_page']+1); if(!empty($query) && $query!=''): ?><?php echo htmlentities($query); ?><?php endif; if(!empty($show_grid)): ?>&show_grid=<?php echo htmlentities($show_grid); ?><?php endif; ?>">
                    <span class="bi-chevron-right"></span>    <!--下一页-->
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="?page=<?php echo htmlentities($list['last_page']); if(!empty($query)): ?><?php echo htmlentities($query); ?><?php endif; if(!empty($show_grid)): ?>&show_grid=<?php echo htmlentities($show_grid); ?><?php endif; ?>">
                    <span class="bi-chevron-double-right"></span>    <!--末页-->
                </a>
            </li>
        <?php endif; ?>


      </ul>
      <br/>
      
    </div>

<script type="text/javascript">


  $(document).ready(function(){

    flatpickr("#sdate", {});
    flatpickr("#edate", {});

    $(".sdate").flatpickr({
        enableTime: true,
        dateFormat: "Y-m-d H:i:s",
    });
    $(".edate").flatpickr({
        enableTime: true,
        dateFormat: "Y-m-d H:i",
    });

    $(".query").on('click',function(){
        var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2

        $("form").submit();
        layer.close(index);
    })    
  })


  




</script>


</body>
</html>
